package com.example.demo.moduel.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * @author xiah
 * @time 2018-04-21
 */
@Data
/*在返回时默认去掉为null的字段*/
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Worker {

       private Long id;

       private String name;

       /*将返回字段更改名称为workerAge*/
       @JsonProperty(value = "workerAge")
       private Integer age;
}
